 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
|
|
 |
Structures
|
|
Initialisation Test yourself
|
|
|
|
|
 |
|
|
 |
|
|
 |
 |
 |
struct {
|
|
|
char name[11];
|
|
|
float
StudentID;
|
|
|
} student =
{“Smith”, 6};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NOTE: “Smith” takes 10 bytes.
|
|
|
|
|
 |
 |
 |
The structure is
similar to that of an array in that a single
|
|
contiguous
memory block is allocated for a structure
|
|
variable, with
the size of the block being large
enough to
|
hold the values of all
structure components.
|
|
|
|
|